import axios from 'axios';

// 假支付
export function fakePay(orderId: number) {
  return axios.post(`/orderapi/orders/${orderId}/fakePay`);
}

// 取消订单
export function cancelOrder(orderId: number) {
  return axios.post(`/orderapi/orders/${orderId}/cancel`);
}

// 申请退款
export function applyRefund(orderId: number) {
  return axios.post(`/orderapi/orders/${orderId}/applyRefund`);
}

// 获取订单列表
export function getOrders() {
  return axios.get('/orderapi/orders');
}

// 获取订单号
export function getOrderNumber() {
  return axios.get('/orderapi/orders/generateOrderNumber');
}